package com.example.ui.learn;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import com.example.huashangapp.HSApplication;
import com.example.ui.leftmenu.DownItem;

import android.os.Environment;
import android.os.Parcel;
import android.os.Parcelable;
public class ListeningInfo  implements Parcelable  {

	private String listen_uri;//播放的地址
	private String listen_thumb;//头像缩略图
	private String listen_title;//标题
	private String listen_name;//讲师名称
	private String listen_blId;//讲师Id
	private int listen_tag;//音频类型 1.我的课堂2.华商访谈
	private String listen_itemId;//课程的编号
	private String listen_id;//音频id;
	private int pos=-1;//选中的id;
	private int size;
	private int fileSize;
	private String intro;
	private List<Boolean> var;
	public ListeningInfo(String listen_uri, String listen_thumb,
			String listen_title, String listen_name, String listen_blId,
			int listen_tag, String listen_itemId,String listen_id,int pos,int size,int fileSize) {
		super();
		this.listen_uri = listen_uri;
		this.listen_thumb = listen_thumb;
		this.listen_title = listen_title;
		this.listen_name = listen_name;
		this.listen_blId = listen_blId;
		this.listen_tag = listen_tag;
		this.listen_itemId = listen_itemId;
		this.listen_id=listen_id;
		this.pos=pos;
		this.size=size;
		this.fileSize=fileSize;
	}
	

	public int getFileSize() {
		return fileSize;
	}

	public void setFileSize(int fileSize) {
		this.fileSize = fileSize;
	}

	public ListeningInfo() {
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public String getListen_uri() {
		return listen_uri;
	}

	public void setListen_uri(String listen_uri) {
		this.listen_uri = listen_uri;
	}

	public String getListen_thumb() {
		return listen_thumb;
	}

	public void setListen_thumb(String listen_thumb) {
		this.listen_thumb = listen_thumb;
	}

	public String getListen_title() {
		return listen_title;
	}

	public void setListen_title(String listen_title) {
		this.listen_title = listen_title;
	}

	public String getListen_name() {
		return listen_name;
	}

	public void setListen_name(String listen_name) {
		this.listen_name = listen_name;
	}

	public String getListen_blId() {
		return listen_blId;
	}

	public void setListen_blId(String listen_blId) {
		this.listen_blId = listen_blId;
	}

	public int getListen_tag() {
		return listen_tag;
	}

	public void setListen_tag(int listen_tag) {
		this.listen_tag = listen_tag;
	}

	public String getListen_itemId() {
		return listen_itemId;
	}

	public void setListen_itemId(String listen_itemId) {
		this.listen_itemId = listen_itemId;
	}

	public String getListen_id() {
		return listen_id;
	}

	public void setListen_id(String id) {
		this.listen_id = id;
	}

	public int getPos() {
		return pos;
	}

	public void setPos(int pos) {
		this.pos = pos;
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel arg0, int arg1) {
		// TODO Auto-generated method stub  
		         // 1.必须按成员变量声明的顺序封装数据，不然会出现获取数据出错  
		         // 2.序列化对象  
		arg0.writeString(listen_uri);  
		arg0.writeString(listen_thumb);  
		arg0.writeString(listen_title);
		arg0.writeString(listen_name);
		arg0.writeString(listen_blId);
		arg0.writeInt(listen_tag);
		arg0.writeString(listen_itemId);
		arg0.writeString(listen_id);
		arg0.writeInt(pos);
		arg0.writeInt(size);
		arg0.writeInt(fileSize);
	}

	  public static final Parcelable.Creator<ListeningInfo> CREATOR = new Creator(){  
		          @Override  
		           public ListeningInfo createFromParcel(Parcel source) {  
		              // TODO Auto-generated method stub  
		               // 必须按成员变量声明的顺序读取数据，不然会出现获取数据出错  
		        	  ListeningInfo p = new ListeningInfo();
		        	   p.setListen_uri(source.readString());
		        	   p.setListen_thumb(source.readString());
		        	   p.setListen_title(source.readString());
		        	   p.setListen_name(source.readString());
		        	   p.setListen_blId(source.readString());
		        	   p.setListen_tag(source.readInt());
		               p.setListen_itemId(source.readString());
		               p.setListen_id(source.readString());
		               p.setPos(source.readInt());
		               p.setSize(source.readInt());
		               p.setFileSize(source.readInt());
		               return p;  
		          }
		           @Override  
		           public ListeningInfo[] newArray(int size) {  
		              
		               return new ListeningInfo[size];  
		           }  
		       };  


}
